package com.zynote.nfhoujie.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Table;

/**
 * 
 * @className:Favorite.java
 * @classDescription: 商品收藏
 * @author: AIDAN SU
 * @createTime: 2012-9-28
 *
 */

@Entity
@Table(name = "t_favorite", catalog = "nfhoujie")
public class Favorite implements java.io.Serializable {
	
	// 字段
	
	private static final long serialVersionUID = 4406447858864019269L;
	
	/** 收藏ID */
	private Long fid;
	
	/** 收藏用户ID */
	private Long favoriteUid;
	
	/** 收藏商品ID */
	private Long commodityId;
	
	/** 收藏商品时间*/
	private Date favoriteTime;
	
	// 构造方法 

	/** 默认构造方法 */
	public Favorite() {
	}

	/** 完整的构造方法 */
	public Favorite(Long favoriteUid, Long commodityId, Date favoriteTime){
		this.favoriteUid = favoriteUid;
		this.commodityId = commodityId;
		this.favoriteTime = favoriteTime;
	}

	// 访问属性方法
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "fid", unique = true, nullable = false)
	public Long getFid() {
		return this.fid;
	}

	public void setFid(Long fid) {
		this.fid = fid;
	}

	@Column(name = "favorite_uid", precision = 20, scale = 0)
	public Long getFavoriteUid() {
		return this.favoriteUid;
	}

	public void setFavoriteUid(Long favoriteUid) {
		this.favoriteUid = favoriteUid;
	}

	@Column(name = "commodity_id", precision = 20, scale = 0)
	public Long getCommodityId() {
		return this.commodityId;
	}

	public void setCommodityId(Long commodityId) {
		this.commodityId = commodityId;
	}
	
	@Column(name = "favorite_time")
	public Date getFavoriteTime() {
		return this.favoriteTime;
	}

	public void setFavoriteTime(Date favoriteTime) {
		this.favoriteTime = favoriteTime;
	}	
	
}